package com.lantosec.hmrp.modules.notify.vo;

import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.modules.notify.entity.NotifyPublicRead;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 公告读看信息 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-05-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="NotifyPublicRead对象", description="公告读看信息")
public class NotifyPublicReadVO extends BaseVO<NotifyPublicRead> {
    private static final long serialVersionUID = 1L;


    public NotifyPublicReadVO(NotifyPublicRead entity){
        this.notifyId = entity.getNotifyId();
        this.userId = entity.getUserId();
        this.readMode = entity.getReadMode();
        this.readTime = entity.getReadTime();
    }

    @Override
    public NotifyPublicRead convertToEntity(){
        return new NotifyPublicRead(this);
    }


    @ApiModelProperty(value = "通知ID")
    private String notifyId;

    @ApiModelProperty(value = "用户ID")
    private String userId;

    @ApiModelProperty(value = "接收方式(1web 2手机)")
    private Integer readMode;

    @ApiModelProperty(value = "已读时间")
    private Date readTime;


}
